<?php

namespace Nim\Bundle\ModelBundle\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;

/**
 * Campain
 *
 * @ORM\Table(name="campain")
 * @ORM\Entity
 */
class Campain
{
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @var string
     *
     * @ORM\Column(name="name", type="string", length=50)
     */
    private $name;

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="start", type="datetime")
     */
    private $start;

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="end", type="date")
     */
    private $end;

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="delivery", type="date")
     */
    private $delivery;
    
    /**
     * @ORM\ManyToOne(targetEntity="Vendor", inversedBy="campains")
     * @ORM\JoinColumn(name="vendor_id")
     */
    private $vendor;
    
    /**
     * @ORM\OneToMany(targetEntity="Image", mappedBy="campain")
     */
    private $images;
    
    /**
     * @ORM\OneToMany(targetEntity="ClientOrder", mappedBy="campain")
     */
    private $clientOrders;
    
    public function __construct()
    {
    	$this->images = new ArrayCollection();
    	$this->clientOrders = new ArrayCollection();
    }
    


    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set name
     *
     * @param string $name
     * @return Campain
     */
    public function setName($name)
    {
        $this->name = $name;
    
        return $this;
    }

    /**
     * Get name
     *
     * @return string 
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Set start
     *
     * @param \DateTime $start
     * @return Campain
     */
    public function setStart($start)
    {
        $this->start = $start;
    
        return $this;
    }

    /**
     * Get start
     *
     * @return \DateTime 
     */
    public function getStart()
    {
        return $this->start;
    }

    /**
     * Set end
     *
     * @param \DateTime $end
     * @return Campain
     */
    public function setEnd($end)
    {
        $this->end = $end;
    
        return $this;
    }

    /**
     * Get end
     *
     * @return \DateTime 
     */
    public function getEnd()
    {
        return $this->end;
    }

    /**
     * Set delivery
     *
     * @param \DateTime $delivery
     * @return Campain
     */
    public function setDelivery($delivery)
    {
        $this->delivery = $delivery;
    
        return $this;
    }

    /**
     * Get delivery
     *
     * @return \DateTime 
     */
    public function getDelivery()
    {
        return $this->delivery;
    }

    /**
     * Set vendor
     *
     * @param \Nim\Bundle\ModelBundle\Entity\Vendor $vendor
     * @return Campain
     */
    public function setVendor(\Nim\Bundle\ModelBundle\Entity\Vendor $vendor = null)
    {
        $this->vendor = $vendor;
    
        return $this;
    }

    /**
     * Get vendor
     *
     * @return \Nim\Bundle\ModelBundle\Entity\Vendor 
     */
    public function getVendor()
    {
        return $this->vendor;
    }

    /**
     * Add images
     *
     * @param \Nim\Bundle\ModelBundle\Entity\Image $images
     * @return Campain
     */
    public function addImage(\Nim\Bundle\ModelBundle\Entity\Image $images)
    {
        $this->images[] = $images;
    
        return $this;
    }

    /**
     * Remove images
     *
     * @param \Nim\Bundle\ModelBundle\Entity\Image $images
     */
    public function removeImage(\Nim\Bundle\ModelBundle\Entity\Image $images)
    {
        $this->images->removeElement($images);
    }

    /**
     * Get images
     *
     * @return \Doctrine\Common\Collections\Collection 
     */
    public function getImages()
    {
        return $this->images;
    }

    /**
     * Add clientOrders
     *
     * @param \Nim\Bundle\ModelBundle\Entity\ClientOrder $clientOrders
     * @return Campain
     */
    public function addClientOrder(\Nim\Bundle\ModelBundle\Entity\ClientOrder $clientOrders)
    {
        $this->clientOrders[] = $clientOrders;
    
        return $this;
    }

    /**
     * Remove clientOrders
     *
     * @param \Nim\Bundle\ModelBundle\Entity\ClientOrder $clientOrders
     */
    public function removeClientOrder(\Nim\Bundle\ModelBundle\Entity\ClientOrder $clientOrders)
    {
        $this->clientOrders->removeElement($clientOrders);
    }

    /**
     * Get clientOrders
     *
     * @return \Doctrine\Common\Collections\Collection 
     */
    public function getClientOrders()
    {
        return $this->clientOrders;
    }
}